<template>
  <el-dialog
    v-loading="loading"
    :visible.sync="dialog"
    :close-on-click-modal="false"
    title="详情"
    width="85%"
  >
    <div style="padding-top:20px">
      <el-table ref="itemTab" :data="data" stripe size="small" border style="width: 100%;" @header-dragend="colChange">
        <el-table-column :show-overflow-tooltip="true" label="条码" prop="upcNbr" :width="colWidths.upcNbr" />
        <el-table-column :show-overflow-tooltip="true" label="采购ID" prop="buyerId" :width="colWidths.buyerId" />
        <el-table-column :show-overflow-tooltip="true" label="部门" prop="deptNbr" :width="colWidths.deptNbr" />
        <el-table-column :show-overflow-tooltip="true" label="商品说明1" prop="buyerItem1Desc" :width="colWidths.buyerItem1Desc" />
        <el-table-column :show-overflow-tooltip="true" label="供应商之商品代码" prop="buyerVendorStockId" :width="colWidths.buyerVendorStockId" />
        <el-table-column :show-overflow-tooltip="true" label="供应商编号" prop="vendorNbr" :width="colWidths.vendorNbr" />
        <el-table-column :show-overflow-tooltip="true" label="供应商名称" prop="vendorName" :width="colWidths.vendorName" />
      </el-table>
      <!--分页组件-->
      <el-pagination
        :total="total"
        :current-page.sync="currentPage"
        :page-sizes="[10,50,100,500]"
        style="margin-top: 8px;"
        layout="total, prev, pager, next, sizes"
        @size-change="sizeChange"
        @current-change="pageChange"
      />
    </div>
  </el-dialog>
</template>

<script>
import initData from '@/utils/initData'

export default {
  mixins: [initData],
  props: {
    parent: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      loading: false,
      dialog: false,
      batchRecordId: ''
    }
  },
  methods: {
    beforeInit() {
      this.url = '/new-item/itemFileUrgentList'
      this.params.pageNum = this.page
      this.params.pageSize = this.size
      this.params.batchRecordId = this.batchRecordId
      return true
    },
    // 查询
    toQuery() {
      this.page = 0
      this.currentPage = 1
      this.init()
    }
  }
}
</script>
